<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Azure Config Generator: FUSE.AzureConfig.Tasks.AzureConfigGen Class Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Azure Config Generator
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="../../classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="../../inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="../../functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Properties</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../d7/d19/namespace_f_u_s_e.html">FUSE</a></li><li class="navelem"><a class="el" href="../../d5/dc3/namespace_f_u_s_e_1_1_azure_config.html">AzureConfig</a></li><li class="navelem"><a class="el" href="../../df/d91/namespace_f_u_s_e_1_1_azure_config_1_1_tasks.html">Tasks</a></li><li class="navelem"><a class="el" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html">AzureConfigGen</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="../../da/dd8/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">FUSE.AzureConfig.Tasks.AzureConfigGen Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for FUSE.AzureConfig.Tasks.AzureConfigGen:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d25/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen__inherit__graph.png" border="0" usemap="#_f_u_s_e_8_azure_config_8_tasks_8_azure_config_gen_inherit__map" alt="Inheritance graph"/></div>
<map name="_f_u_s_e_8_azure_config_8_tasks_8_azure_config_gen_inherit__map" id="_f_u_s_e_8_azure_config_8_tasks_8_azure_config_gen_inherit__map">
</map>
<center><span class="legend">[<a href="../../graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for FUSE.AzureConfig.Tasks.AzureConfigGen:</div>
<div class="dyncontent">
<div class="center"><img src="../../d8/d56/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen__coll__graph.png" border="0" usemap="#_f_u_s_e_8_azure_config_8_tasks_8_azure_config_gen_coll__map" alt="Collaboration graph"/></div>
<map name="_f_u_s_e_8_azure_config_8_tasks_8_azure_config_gen_coll__map" id="_f_u_s_e_8_azure_config_8_tasks_8_azure_config_gen_coll__map">
</map>
<center><span class="legend">[<a href="../../graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad35a7e77ecadb1f27ee126d9bfefa651"><td class="memItemLeft" align="right" valign="top">override bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#ad35a7e77ecadb1f27ee126d9bfefa651">Execute</a> ()</td></tr>
<tr class="separator:ad35a7e77ecadb1f27ee126d9bfefa651"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a3673112f530794af7eec0a2b25eb9930"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#a3673112f530794af7eec0a2b25eb9930">ConfigurationDirectory</a><code> [get, set]</code></td></tr>
<tr class="separator:a3673112f530794af7eec0a2b25eb9930"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa07243a35b522d22df2049fa44acdaaf"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aa07243a35b522d22df2049fa44acdaaf">ConfigurationFile</a><code> [get, set]</code></td></tr>
<tr class="separator:aa07243a35b522d22df2049fa44acdaaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff3052fac75d0308bfa72c67b5cfcf46"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aff3052fac75d0308bfa72c67b5cfcf46">OutputDirectory</a><code> [get, set]</code></td></tr>
<tr class="separator:aff3052fac75d0308bfa72c67b5cfcf46"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p>Definition at line <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html#l00011">11</a> of file <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html">AzureConfigGen.cs</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad35a7e77ecadb1f27ee126d9bfefa651"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">override bool FUSE.AzureConfig.Tasks.AzureConfigGen.Execute </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html#l00019">19</a> of file <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html">AzureConfigGen.cs</a>.</p>
<div class="fragment"><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        {</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;            <span class="keywordflow">if</span> (<span class="keywordtype">string</span>.IsNullOrEmpty(this.<a class="code" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aa07243a35b522d22df2049fa44acdaaf">ConfigurationFile</a>))</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(<span class="stringliteral">&quot;Must specify ConfigurationFile&quot;</span>);</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;            <span class="keywordflow">if</span> (!<span class="keywordtype">string</span>.IsNullOrEmpty(this.<a class="code" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aff3052fac75d0308bfa72c67b5cfcf46">OutputDirectory</a>) &amp;&amp; !Directory.Exists(<span class="keyword">this</span>.OutputDirectory))</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentException(this.<a class="code" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aff3052fac75d0308bfa72c67b5cfcf46">OutputDirectory</a> + <span class="stringliteral">&quot; output directory must exist if specified&quot;</span>);</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;            this.OutputDirectory = this.OutputDirectory ?? this.ConfigurationDirectory;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;            <span class="keywordflow">if</span> (!<span class="keywordtype">string</span>.IsNullOrEmpty(this.<a class="code" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#a3673112f530794af7eec0a2b25eb9930">ConfigurationDirectory</a>))</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;            {</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;                <span class="keywordflow">if</span> (!Directory.Exists(<span class="keyword">this</span>.ConfigurationDirectory))</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;                    <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentException(this.<a class="code" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#a3673112f530794af7eec0a2b25eb9930">ConfigurationDirectory</a> + <span class="stringliteral">&quot; must exist.&quot;</span>);</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;                <span class="keywordflow">if</span> (!Path.IsPathRooted(<span class="keyword">this</span>.ConfigurationFile))</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                    this.<a class="code" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aa07243a35b522d22df2049fa44acdaaf">ConfigurationFile</a> = Path.Combine(<span class="keyword">this</span>.ConfigurationDirectory, <span class="keyword">this</span>.ConfigurationFile);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;            }</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;            <span class="keywordflow">if</span> (!File.Exists(<span class="keyword">this</span>.ConfigurationFile))</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentException(this.<a class="code" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aa07243a35b522d22df2049fa44acdaaf">ConfigurationFile</a> + <span class="stringliteral">&quot; does not exist&quot;</span>);</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            AzureConfigSpec confSpec;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            <span class="keywordflow">try</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;                confSpec = JsonConvert.DeserializeObject&lt;AzureConfigSpec&gt;(File.ReadAllText(this.ConfigurationFile));</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;            } <span class="keywordflow">catch</span> (Exception e)</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;                <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentException(<span class="stringliteral">&quot;Failed to parse &quot;</span> + this.<a class="code" href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aa07243a35b522d22df2049fa44acdaaf">ConfigurationFile</a>, e);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            }</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            var conf = <span class="keyword">new</span> SpecProcessor().Process(confSpec);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            var generator = <span class="keyword">new</span> FileGenerator();</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;            generator.AlterCsdef(conf, this.ConfigurationDirectory, this.OutputDirectory);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;            generator.AlterCscfgs(conf, this.ConfigurationDirectory, this.OutputDirectory);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        }</div>
<div class="ttc" id="class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen_html_a3673112f530794af7eec0a2b25eb9930"><div class="ttname"><a href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#a3673112f530794af7eec0a2b25eb9930">FUSE.AzureConfig.Tasks.AzureConfigGen.ConfigurationDirectory</a></div><div class="ttdeci">string ConfigurationDirectory</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d8d/_azure_config_gen_8cs_source.html#l00015">AzureConfigGen.cs:15</a></div></div>
<div class="ttc" id="class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen_html_aa07243a35b522d22df2049fa44acdaaf"><div class="ttname"><a href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aa07243a35b522d22df2049fa44acdaaf">FUSE.AzureConfig.Tasks.AzureConfigGen.ConfigurationFile</a></div><div class="ttdeci">string ConfigurationFile</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d8d/_azure_config_gen_8cs_source.html#l00013">AzureConfigGen.cs:13</a></div></div>
<div class="ttc" id="class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen_html_aff3052fac75d0308bfa72c67b5cfcf46"><div class="ttname"><a href="../../dc/db2/class_f_u_s_e_1_1_azure_config_1_1_tasks_1_1_azure_config_gen.html#aff3052fac75d0308bfa72c67b5cfcf46">FUSE.AzureConfig.Tasks.AzureConfigGen.OutputDirectory</a></div><div class="ttdeci">string OutputDirectory</div><div class="ttdef"><b>Definition:</b> <a href="../../d7/d8d/_azure_config_gen_8cs_source.html#l00017">AzureConfigGen.cs:17</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a3673112f530794af7eec0a2b25eb9930"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">string FUSE.AzureConfig.Tasks.AzureConfigGen.ConfigurationDirectory</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html#l00015">15</a> of file <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html">AzureConfigGen.cs</a>.</p>

</div>
</div>
<a class="anchor" id="aa07243a35b522d22df2049fa44acdaaf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">string FUSE.AzureConfig.Tasks.AzureConfigGen.ConfigurationFile</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html#l00013">13</a> of file <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html">AzureConfigGen.cs</a>.</p>

</div>
</div>
<a class="anchor" id="aff3052fac75d0308bfa72c67b5cfcf46"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">string FUSE.AzureConfig.Tasks.AzureConfigGen.OutputDirectory</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html#l00017">17</a> of file <a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html">AzureConfigGen.cs</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="../../d7/d8d/_azure_config_gen_8cs_source.html">AzureConfigGen.cs</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 3 2014 17:37:46 for Azure Config Generator by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
